//
//  CTLogin.h
//  ConstellationTalk_0.1
//
//  Created by riley on 15/4/29.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CTLoginItems.h"
#import "CTUserItem.h"


typedef void (^requestSuccessedBlock)(CTVisitorLoginCompletionItem * item);
typedef void (^requestFailedBlock)();

typedef void (^exitSuccessedBlock)();
typedef void (^exitFailedBlock)();


@interface CTLogin : NSObject

//验证token
+(NSString *)token;


//应用第一次启动
+(BOOL)isAppLicationFirstLunch;
//是否是登录状态
+(BOOL)isLoginState;
//是否是用户登录状态
+(BOOL)isUserLoginState;



//游客登录
+(void)visitorLoginWithsSuccessCompletionHandler:(requestSuccessedBlock)successBlock
             failedHandler:(requestFailedBlock)failedBlock;
//用户退出
+(void)exitAccountWithsSuccessCompletionHandler:(exitSuccessedBlock)successBlock
                                  failedHandler:(exitFailedBlock)failedBlock;


@end
